WNGZWZSC01200% ADDRESS.SCZ:cancel_op = 1 7ADDRESS.SCZ:cancel_op = 0; call ADDRESS.SCZ:do_remove() add list box " '" at (.2inch,.2inch)+(1.7inch,2.7inch)5 add list box items " 433333y@ ADDRESS.SCZ:cancel_op = 1 5ADDRESS.SCZ:cancel_op = 0;call ADDRESS.SCZ:SetData() kyoto 433333y@ 433333y@ 433333y@ 433333y@ 433333y@ gfffffw@ gfffffw@ 433333y@ 433333y@ 433333y@ 433333y@ 433333y@ 433333y@ 433333y@ 433333y@ 433333y@ gPRSHEET.SCZ System ADDRESS.WKZ max_line state addr1 addr2 cancel_op select_line operation_string data_f select_data do_setting extract_data max_line_count main_dialog remove_data do_select do_remove add_data update_data SetDatam ad_helpq ADDRESS.SCZ copyright 1992 (C) ASCII Corporation 1992/1/4 Author taku-k define yomi, name, sex, age, tel, zip, state, city, addr1, addr2 define cancel_op, i, select_line, operation_string, data_f function select_data() unselect operation_string = " if do_setting() data find end if end function function extract_data() unselect call max_line_count() operation_string = " if do_setting() repaint selections off select range makerange(27,3,36,2+ADDRESS.WKZ:max_line) clear repaint selections on select range aa2..aj2 select more range l3..u3 data extract call max_line_count() end if end function function max_line_count() ADDRESS.WKZ:max_line = 1 while not isblank(range(makecell(27,ADDRESS.WKZ:max_line+1))) ADDRESS.WKZ:max_line = ADDRESS.WKZ:max_line + 1 end while end function function do_setting() if not main_dialog(2) repaint selections off select range l3..u3 clear repaint selections on if yomi <> "" put yomi into l3 end if if name <> "" put name into m3 end if case sex when 1 put " j" into n3 when 2 put " " into n3 when 3 put "*" into n3 end case if age put age into o3 end if if tel <> "" put tel into p3 end if if zip <> "" put zip into q3 end if if state <> "" put state into r3 end if if city <> "" put city into s3 end if if addr1 <> "" put addr1 into t3 end if if addr2 <> "" put addr2 into u3 end if return 1 else return 0 end if end function function remove_data() operation_string = " call do_select() if not cancel_op repaint selections off select range range(makerange(1,select_line +3, 32768, select_line +3)) delete unselect repaint selections on end if end function function do_select() cancel_op = 1 new modal dialog box at(-1, -1)(2.8inch, 3inch) add push button operation_string, " " at ( 2.1inch, 1.5inch)+(.5inch, 1.3inch) script "ADDRESS.SCZ:cancel_op = 1" dialog cancel push button select control 1 script "ADDRESS.SCZ:cancel_op = 0; call ADDRESS.SCZ:do_remove()" dialog default push button i = 0 while not isblank(range(makecell(2, 4+i ))) if not i run "add list box """ & indirect(makecell(2,4)) & """ at (.2inch,.2inch)+(1.7inch,2.7inch)" i = 1 else run "add list box items """ & indirect(makecell(2, 4+i )) & """" i = i + 1 end if end while show scroll bar list box use dialog box end function function do_remove() select_line = ctvalue(3,0) end function function add_data() cancel_op = 0 operation_string = " while not main_dialog(1) repaint selections off select range a4..avlh4 insert put yomi into a4 put name into b4 if sex-1 put " " into c4 else put " j" into c4 end if put age into d4 put tel into e4 put zip into f4 put state into g4 put city into h4 put addr1 into i4 put addr2 into j4 repaint selections on format general select range a4 end while end function function update_data() operation_string = " call do_select() if not cancel_op and select_line if not main_dialog(0) put yomi into makecell(1, select_line + 3 ) put name into makecell(2, select_line + 3 ) if sex -1 put " " into makecell(3, select_line + 3 ) else put " j" into makecell(3, select_line + 3 ) end if put age into makecell(4, select_line + 3 ) put tel into makecell(5, select_line + 3 ) put zip into makecell(6, select_line + 3 ) put state into makecell(7, select_line + 3 ) put city into makecell(8, select_line + 3 ) put addr1 into makecell(9, select_line + 3 ) put addr2 into makecell(10, select_line + 3 ) end if end if end function function main_dialog(n) new modal dialog box at(-1,-1) (7inch, 4.5inch) add push button operation_string, " " at (1inch,4.0inch)+(2.4inch,0.28inch) script "ADDRESS.SCZ:cancel_op = 1" dialog cancel push button select control 1 script "ADDRESS.SCZ:cancel_op = 0;call ADDRESS.SCZ:SetData()" dialog default push button add text operation_string at (0.2inch,0.05inch)+(6inch,0.48inch) no line border text size 24 text font "kyoto" add text " " at (0.5inch,1inch)+(1.2inch,0.28inch) no line border add field at (1.5inch,1inch)+(2.8inch,0.28inch) select field text from 1 to 1 if not n field text indirect(makecell(1, select_line+ 3)) end if add text " " at (0.5inch,1.4inch)+(1.2inch,0.28inch) no line border add field at(1.5inch,1.4inch)+(2.8inch,0.28inch) if not n field text indirect(makecell(2, select_line+ 3)) end if add text " " at (0.5inch,1.8inch)+(1.2inch,0.28inch) no line border if n = 2 add check box " " at (1.5inch,1.8inch)+(1.7inch,0.26inch) check box 1; check box 2 else add radio button " " at (1.5inch,1.8inch)+(1.7inch,0.26inch) if not n if indirect(makecell(3, select_line+ 3)) = " radio button 1 else radio button 2 end if end if end if no line border add text " " at (0.5inch,2.2inch)+(1.2inch,0.28inch) no line border if n = 2 add field at (1.5inch,2.2inch)+(1.2inch,0.29inch) else add number wheel at (1.5inch,2.2inch)+(1.2inch,0.3inch) number wheel range 1 to 100 number wheel step 1 if n number wheel position 20 else number wheel position indirect(makecell(4, select_line+ 3)) end if number wheel precision 0 end if add text "TEL" at (0.5inch,2.6inch)+(1.2inch,0.28inch) no line border add field at (1.5inch,2.6inch)+(2.1inch,0.28inch) if not n field text indirect(makecell(5, select_line+ 3)) end if add text " " at (0.5inch,3.0inch)+(1.2inch,0.28inch) no line border add field at (1.2inch,3.0inch)+(1.1inch,0.28inch) if not n field text indirect(makecell(6, select_line+ 3)) end if control name " add field at (2.45inch,3.0inch)+(2.1inch,0.28inch) if not n field text indirect(makecell(7, select_line+ 3)) end if control name " add field at (4.7inch,3.0inch)+(2.1inch,0.28inch) if not n field text indirect(makecell(8, select_line+ 3)) end if control name " add field at (1.2inch,3.4inch)+(2.4inch,0.28inch) if not n field text indirect(makecell(9, select_line+ 3)) end if control name " add field at (4.0inch,3.4inch)+(2.4inch,0.28inch) if not n field text indirect(makecell(10, select_line+ 3)) end if control name " add text " " at (0inch,0.6inch)+(7inch,0inch) use dialog box return cancel_op end function function SetData() define temp yomi = ctstring(5,0) name = ctstring(7,0) temp = ctvalue(9,1) {HyperScript sex = bitor( ctvalue(9,2)*2 , temp) {3= j, 0= age = value(ctstring(11,0)) {Number Wheel field tel = ctstring(13,0) zip = ctstring(15,0) state = ctstring(16,0) city = ctstring(17,0) addr1 = ctstring(18,0) addr2 = ctstring(19,0) end function function ad_help() new modal dialog box at (-1, -1) (6inch, 4.1inch) add push button " " at (2.5inch, 3.7inch)+(1inch, 0.35inch) dialog default push button add field at (.1inch, .1inch)+(5.8inch, 3.4inch) show scroll bar field field text replace field text "JVR" with JVR" options "A" replace field text "JVR" with JVR" options "A" replace field text "JVR" with JVR" options "A" replace field text "JVR" with JVR" options "A" replace field text "JVR" with JVR" options "A" replace field text "JVR" with JVR" options "A" replace field text "JVR" with gPRSHEET.SCZ B" options "A" field top margin 360 field left margin 360 field right margin 360 field justification flush field single font text font "System" text size 12 field multiple fonts find field text " :" options "BA" ; text style "B" ; text color red() find field text " :" options "BA" ; text style "B" ; text color red() find field text " X:" options "BA" ; text style "B" ; text color red() find field text " :" options "BA" ; text style "B" ; text color red() find field text " o:" options "BA" ; text style "B" ; text color red() find field text " :" options "BA" ; text style "B" ; text color red() find field text " " options "A" text style "BO" text size 18 text color blue() repaint selections off use dialog box repaint selections on repaint window end function